.PHONY:all
all: libfor_test.so libfor_test.a

libfor_test.so:my_math_d.o
	gcc -shared my_math_d.o -o libfor_test.so 
my_math_d.o:my_math.c
	gcc -c -fPIC my_math.c -o my_math_d.o 


libfor_test.a:my_math.o
	ar -rc libfor_test.a my_math.o
my_math.o:my_math.c
	gcc -c my_math.c -o my_math.o

.PHONY:output 
output:
	mkdir -p libtest/lib 
	mkdir -p libtest/include
	cp -rf *.h libtest/include
	cp -fr *.a libtest/lib 
	cp -fr *.so libtest/lib 

.PHONY:clean 
clean:
	rm -rf *.o *.a *.so libtest 
